package com.xishu.entity.order;

import com.xishu.annotation.dao.Search;
import com.xishu.entity.AbstractEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.Version;

@Entity(name = "order_no")
@Table(indexes = {@Index(columnList = "shopId")})
public class OrderNo extends AbstractEntity {
    @ApiModelProperty(value = "分店ID")
    private Long shopId;

    @ApiModelProperty(value = "订单号")
    @Search(ignore = true)
    private int orderNo;

    @ApiModelProperty(value = "菜的编号")
    @Search(ignore = true)
    private long orderItemNo;

    @ApiModelProperty(value = "餐桌的编号")
    @Search(ignore = true)
    private int foodTableNo;

    @ApiModelProperty(value = "聚餐码")
    @Search(ignore = true)
    private int takeOutNo;

    @ApiModelProperty(value = "分店的闭店序列号，也就是经营周期")
    @Search(ignore = true)
    private int timeFix;

    @Version
    @ApiModelProperty(value = "版本号")
    @Search(ignore = true)
    private long lockVersion;

    public int getTimeFix() {
        return timeFix;
    }

    public void setTimeFix(int timeFix) {
        this.timeFix = timeFix;
    }

    public long getOrderItemNo() {
        return orderItemNo;
    }

    public void setOrderItemNo(long orderItemNo) {
        this.orderItemNo = orderItemNo;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public int getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(int orderNo) {
        this.orderNo = orderNo;
    }

    public long getLockVersion() {
        return lockVersion;
    }

    public void setLockVersion(long lockVersion) {
        this.lockVersion = lockVersion;
    }

    public int getFoodTableNo() {
        return foodTableNo;
    }

    public void setFoodTableNo(int foodTableNo) {
        this.foodTableNo = foodTableNo;
    }

    public int getTakeOutNo() {
        return takeOutNo;
    }

    public void setTakeOutNo(int takeOutNo) {
        this.takeOutNo = takeOutNo;
    }
}
